wayland: close() the selection fd if we didn't start writing yet
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 24 Jun 2015 19:52:23 +0000 (21:52 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 24 Jun 2015 21:52:50 +0000 (23:52 +0200)
commit3bd7b2a6fb31a3cf379466b08c497552f0c27c0f
treecb3c4572ea6b3627244b600409afa829f9cb49a0
parent5e7159413d2545e3fd1454b14852f8c4f82ec0c5
wayland: close() the selection fd if we didn't start writing yet

If the other peer requests data too fast (too rare/unlikely though),
we might receive multiple gdk_wayland_selection_request_target() calls
with no ending gdk_wayland_selection_check_write(), in which case the
fd is leaked as no GOutputStream was created to take over it.

https://bugzilla.gnome.org/show_bug.cgi?id=751414
gdk/wayland/gdkselection-wayland.c